<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/common/common.jsp"%>
<%@ page import="com.chanyachting.emall.util.*" %>
<%@ page import="java.util.*" %>

<%@ page import="com.chanyachting.emall.domain.*" %>
<%@ page import="com.chanyachting.emall.util.RequestUtil" %>
<%@ page import="com.chanyachting.emall.service.*" %>
<%@ page import="com.chanyachting.emall.serviceImpl.*" %>

<%
	
RequestUtil ru=new RequestUtil(request);

int riId=Integer.parseInt(ru.getParameter("riId","0"));
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="" /> 
<meta name="description" content="" />
<link href="css/import.css" type="text/css" rel="stylesheet" />
<title>招聘信息添加岗位</title>

	 <link type="text/css" href="<%=root%>/js/jqueryUI/css/ui.base.css" rel="stylesheet" />
	 <link type="text/css" href="<%=root%>/js/jqueryUI/css/ui.theme.css" rel="stylesheet" />
	 <link type="text/css" href="<%=root%>/js/jqueryUI/css/demos.css" rel="stylesheet" />
	 
<script type="text/javascript" src="<%=root %>/js/jquery-1.3.2.min.js" charset="utf-8">//ADCRM</script>
<script type="text/javascript" src="<%=root %>/js/jquery.form.js" charset="utf-8">//ADCRM</script>

	<script type="text/javascript" src="<%=root%>/js/jqueryUI/ui/ui.core.js"></script>
	<script type="text/javascript" src="<%=root%>/js/jqueryUI/ui/ui.datepicker.js"></script>
	
	<script type="text/javascript" src="<%=root%>/js/jqueryUI/ui/ui.draggable.js"></script>
	<script type="text/javascript" src="<%=root%>/js/jqueryUI/ui/ui.resizable.js"></script>
	<script type="text/javascript" src="<%=root%>/js/jqueryUI/ui/ui.dialog.js"></script>
	
	
<script language="javascript" type="text/javascript">

	$(function(){

		$.ajaxSetup ({
		    cache: false //关闭AJAX相应的缓存
		});


		$("#createdate").datepicker();
		$("#enddate").datepicker();

		});


	var riId="<%=riId%>";

	//添加工作岗位
	function addjob(theForm){

		options={
			    url:theForm.action,
			    success: function(data){
					
					alert("添加成功！");
	    
				    $(window.opener.document.getElementById("joblist")).load("ri_job_list.jsp",{riId:riId});
				    }
			  };
				
		$(theForm).ajaxSubmit(options);
	
	}

</script>

</head>

<body>

<table width="700" border="0" align="center" cellpadding="0" cellspacing="0" id="a1">
    <tr>
      <td height="28" colspan="2" align="right" class="td_top"></td>
    </tr>
    
    <form action="<%=root %>/memberBackend/riJobAdd.do" method="post">
    
    <input type="hidden" name="riId" value="<%=riId %>" />
    
    <tr>
      <td align="left" valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td width="100" height="28" align="right">岗位类型：</td>
            <td><select name="jobtype" id="select7">
            	<%
            		Iterator it=CodeMap.jobType.keySet().iterator();
            	
            		while(it.hasNext()){
            			
            			String key=it.next().toString();
            			
            			String value=CodeMap.jobType.get(key).toString();
            	%>
            		<option value="<%=key %>"><%=value %></option>
            	<%
            			
            		}
            	
            	%>
              </select>
                <input type="text" name="jobtypedesc" id="textfield4" /></td>
          </tr>
          <tr>
            <td height="28" align="right">岗位名称：</td>
            <td><label>
              <input type="text" name="jobname" id="textfield12" />
            </label></td>
          </tr>
          <tr>
            <td height="28" align="right">工作地点：</td>
            <td><label>
              <input type="text" name="jobaddress" id="textfield13" />
            </label></td>
          </tr>
          <tr>
            <td height="28" align="right">工作经验：</td>
            <td><label>
              <select name="workExperience" id="select10">
              <%
            		Iterator it_injobTime=CodeMap.injobTime.keySet().iterator();
            	
            		while(it_injobTime.hasNext()){
            			
            			String key=it_injobTime.next().toString();
            			
            			String value=CodeMap.injobTime.get(key).toString();
            	%>
            		<option value="<%=key %>"><%=value %></option>
            	<%
            			
            		}
            	
            	%>
              </select>
            </label></td>
          </tr>
          <tr>
            <td height="28" align="right">学历要求：</td>
            <td><label>
              <select name="schoolage" id="select11">
               <%
            		Iterator it_edu=CodeMap.edu.keySet().iterator();
            	
            		while(it_edu.hasNext()){
            			
            			String key=it_edu.next().toString();
            			
            			String value=CodeMap.edu.get(key).toString();
            	%>
            		<option value="<%=key %>"><%=value %></option>
            	<%
            			
            		}
            	
            	%>
              </select>
            </label></td>
          </tr>
          <tr>
            <td height="28" align="right">招聘人数：</td>
            <td><label>
            	<select name="jobnumber" id="select11">
            	
            	<%
            		for(int i=1; i<21; i++){
            			
            	%>
            	<option value="<%=i %>"><%=i %></option>	
            	<%		
            			
            		}
            	%>
            	
            	</select>
             
            </label></td>
          </tr>
          <tr>
            <td height="28" align="right">月薪范围：</td>
            <td><label>
              <select name="jobpay" id="select12">
              <%
            		Iterator it_income=CodeMap.income.keySet().iterator();
            	
            		while(it_income.hasNext()){
            			
            			String key=it_income.next().toString();
            			
            			String value=CodeMap.income.get(key).toString();
            	%>
            		<option value="<%=key %>"><%=value %></option>
            	<%
            			
            		}
            	
            	%>
              </select>
            </label></td>
          </tr>
          <tr>
            <td height="28" align="right">发布日期：</td>
            <td><label>
              <input type="text" name="createdate" id="createdate" value="01/01/2009"/>
            </label></td>
          </tr>
          <tr>
            <td height="28" align="right">截止日期：</td>
            <td><label>
              <input type="text" name="enddate" id="enddate" value="01/01/2010"/>
            </label></td>
          </tr>
      </table></td>
      <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td align="right" valign="top">岗位描述：</td>
            <td><textarea name="summary" id="textarea" cols="40" rows="14"></textarea></td>
          </tr>
      </table></td>
    </tr>
    <tr>
      <td height="28" align="center"  class="td_dashed">　
        <input type="button" name="button" id="button5" value="保存" onclick="addjob(this.form);"/>
        <input type="button" name="button" id="button5" value="关闭窗口" onclick="window.close();"/>
      </td>
      <td valign="top"  class="td_dashed">&nbsp;</td>
    </tr>
   </form>
   
  </table>
  
  </body>
</html>
